package com.dyz.wsw.domain.admin.pojo;

import com.dyz.wsw.common.validation.account.UserRules;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.io.Serializable;

/**
 * 封装用户登录传输过来的信息
 * @author dyz
 * Time 2024/6/26 23:54
 */
@Data
public class LoginInfoDTO implements Serializable,UserRules {
    //登陆用户名的明文
    @NotBlank(message = MESSAGE_USERNAME_NOT_NULL)
    @Pattern(regexp = PATTERN_USERNAME,message = MESSAGE_USERNAME_PATTERN)
    private String username;
    //通过AES加密后的密码密文
    @NotBlank(message = MESSAGE_PASSWORD_NOT_NULL)
    private String password;
    //公钥加密后的AES密钥,用于解密password明文
    @NotBlank(message = MESSAGE_KEY_NOT_NULL)
    private String key;

    //此数据暂时没用上，先留着扩展用
    @NotBlank(message = MESSAGE_UID_NOT_NULL)
    private String uid;
}
